package com.lavegue.service.impl;

import com.lavegue.common.BaseService;
import com.lavegue.common.Page;
import com.lavegue.dao.BeadrollDao;
import com.lavegue.model.Beadroll;
import com.lavegue.service.BeadrollService;


public class BeadrollServiceImpl extends BaseService<Beadroll, Integer, BeadrollDao> implements BeadrollService{
	
	private BeadrollDao beadrollDao;
	
	public BeadrollDao getBeadrollDao() {
		return beadrollDao;
	}

	public void setBeadrollDao(BeadrollDao beadrollDao) {
		this.beadrollDao = beadrollDao;
	}

	/**20120229
	 * 查询名录表
	 * @param bid
	 * @return
	 */
	public Beadroll queryBeadroll(Integer bid){
		Beadroll beadroll = beadrollDao.queryBeadroll(bid);
		return beadroll;
	}
	
	/**20120229
	 * 修改名录记录
	 * @param beadroll
	 * @return
	 */
	public boolean updateBeadroll(Beadroll beadroll){
		return beadrollDao.updateBeadroll(beadroll);
	}
	
	/**20120229
	 * 删除名录记录
	 * @param bid
	 * @return
	 */
	public boolean deleteBeadroll(Beadroll beadroll){
		return beadrollDao.deleteBeadroll(beadroll);
	}
	
	/**20120229
	 * 新增名录记录
	 * @param beadroll
	 * @return
	 */
	public boolean insertBeadroll(Beadroll beadroll){
		return beadrollDao.insertBeadroll(beadroll);
	}
	
	/**后台-查询名录数据列表
	 * 20120229
	 * @param pageNo页数
	 * @param pageSize2     一页显示的行数
	 * @param provinceId 省份ID
	 * @param cityId 城市ID
	 * @return
	 */
	public Page<Beadroll> findAllBeadrollList(int pageNo,int pageSize2,Integer provinceId,Integer cityId){
		Page<Beadroll> beadrollPage = beadrollDao.findAllBeadrollList(pageNo, pageSize2, provinceId, cityId);
		if(null != beadrollPage){
			return beadrollPage;
		}
		return null;
	}
	
	/**前台-随机查询名录数据列表100条数据
	 * 20120305  搜索100条数据（随机100条数据）
	 * @param pageNo页数
	 * @param pageSize2     一页显示的行数
	 * @param provinceId 省份ID
	 * @param cityId 城市ID
	 * @return
	 */
	public Page<Beadroll> findRandomAllBeadrollList(int pageNo,int pageSize2,Integer provinceId,Integer cityId){
		Page<Beadroll> beadrollPage = beadrollDao.findRandomAllBeadrollList(pageNo, pageSize2, provinceId, cityId);
		if(null != beadrollPage){
			return beadrollPage;
		}
		return null;
	}
	
	
}
